<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理界面</title>
<link href="upload_pic_files/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
   #preview_wrapper{     
       display:inline-block;     
       width:48px;     
      height:48px;     
      background-color:#CCC;     
  }     
  #preview_fake{ /* 该对象用户在IE下显示预览图片 */     
      filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);     
  }     
  #preview_size_fake{ /* 该对象只用来在IE下获得图片的原始尺寸，无其它用途 */     
      filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);       
      visibility:hidden;     
  }     
  #preview{ /* 该对象用户在FF下显示预览图片 */     
      width:48px;     
      height:48px;     
  }
</style>
<script type="text/javascript" src="upload_pic_files/jquery.js"></script>
<script type="text/javascript" src="upload_pic_files/picview.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#form1").submit(function(){
		if($("input[name='gname']").val()==''){
			alert("请输入学生姓名");
			$("input[name='gname']").focus();
			return false;
		}
		if($("input[name='gcontent']").val()==''){
			alert("内容不能为空");
			return false;
		}
		if($("input[name='gtime']").val()==''){
			alert("发布时间不能为空");
			return false;
		}
		var reg = /^\d{4,4}[-]\d{1,2}[-]\d{1,2}$/;
		if(!reg.test($("input[name='gtime']").val())){
			alert("时间的格式不正确");
			$("input[name='gtime']").focus();
			return false;
		}
		return true;
	});					   
});
</script>
</head><body id="page">
<h2>“西部阳光”学生回音壁信息添加</h2>
<form action="" method="post" id="form1" enctype="multipart/form-data">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tbody><tr>
    <th width="22%">学生姓名：</th>
    <td width="78%"><input name="gname" maxlength="20" type="text">*</td>
  </tr>
  <tr>
  <th>学生头像</th><td><input id="upload_img" name="upfile" 
onchange="onUploadImgChange(this)" type="file">
  <div id="preview_wrapper">    
         <div id="preview_fake">    
             <img style="width: 48px; height: 48px; margin-top: 0px; 
margin-left: 0px;" id="preview" 
src="upload_pic_files/noavatar_small.gif" onload="onPreviewLoad(this)"> 
   
         </div>    
  </div><img id="preview_size_fake"></td>
  </tr>
  <tr>
    <th>内容：</th>
    <td><textarea name="gcontent" cols="60" rows="8"></textarea>*</td>
  </tr>
  <tr>
    <th>发布时间：</th>
    <td><input name="gtime" maxlength="20" type="text">*</td>
  </tr>
  <tr><td colspan="2">注：*选项必填，时间格式为xxxx-xx-xx</td></tr>
  <tr>
    <th>&nbsp;</th>
    <td><input name="" class="bt" value="添加" type="submit"></td>
  </tr>
</tbody></table>
<input name="action" value="1" type="hidden">
</form>
</body></html>